{\rtf1\ansi\ansicpg936\cocoartf1671\cocoasubrtf200
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset134 PingFangSC-Regular;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww28600\viewh18000\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0

\f0\fs24 \cf0 memcached\
\
apt install -y memcached\
\
service memcached stop\
service memcached start\
service memcached restart\
\
vi /etc/memcached.conf\

\f1 \'d7\'a8\'d3\'c3
\f0 memcache
\f1 \'b7\'fe\'ce\'f1\'c6\'f7\'bf\'c9\'d2\'d4\'b8\'f8memcache\'b7\'d6\'c5\'e4\'cf\'b5\'cd\'b370%\'b5\'c4\'c4\'da\'b4\'e6\
\'d0\'de\'b8\'c4\'cd\'ea\'c5\'e4\'d6\'c3\'d0\'e8\'d2\'aa\'d6\'d8\'c6\'f4\'b7\'fe\'ce\'f1\
\
\'c1\'ac\'bd\'d3memcache\'a3\'ba\
telnet 127.0.0.1 11211\
\'b2\'e9\'bf\'b4\'d7\'b4\'cc\'ac\'a3\'ba\
stats \'c3\'fc\'c1\'ee\
quit \'c3\'fc\'c1\'ee\'cd\'cb\'b3\'f6\'d7\'b4\'cc\'ac\'b2\'e9\'bf\'b4\
\
pip3 install python-memcached\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0

\f0 \cf0 service memcached start
\f1 \'c6\'f4\'b6\'af
\f0 memcache
\f1 \'b7\'fe\'ce\'f1\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\cf0 \'bd\'f8\'c8\'ebpython3\'b5\'c4shell\'c4\'a3\'ca\'bd\
import memcache\
\'c1\'ac\'bd\'d3memcache:\
mc = memcache.Client([\'a1\'ae127.0.0.1:11211\'a1\'af])\
\'b4\'e6\'c8\'eb\'a3\'ba\
mc.set(\'a1\'aename\'a1\'af,\'a1\'afpython\'a1\'af,60) #name:python\'ce\'aa\'bc\'fc\'d6\'b5\'b6\'d4\'a3\'ac\'b9\'fd\'c6\'da\'ca\'b1\'bc\'e4\'ce\'aa60\'c3\'eb\
\'b6\'c1\'c8\'a1\'a3\'ba\
res = mc.get(\'a1\'aename\'a1\'af) #\'ca\'e4\'b3\'f6python\
\'c9\'be\'b3\'fd\'a3\'ba\
mc.delete(\'a1\'aename\'a1\'af)\
\
\
\'d4\'dapython\'b3\'cc\'d0\'f2\'d6\'d0\'ca\'b9\'d3\'c3memcache\
\'c7\'eb\'b2\'e9\'bf\'b4\'bf\'ce\'bc\'fe\'cb\'d8\'b2\'c4\'c4\'da\'c8\'dd\
\
}